

import CirclePulseMaterialShader from '../shader/circle/CirclePulseMaterialShader.glsl?raw'
import CircleLollipopMaterialShader from '../shader/circle/CircleLollipopMaterialShader.glsl?raw'
import CirclePeakMaterialShader from '../shader/circle/CirclePeakMaterialShader.glsl?raw'
import CircleWaveMaterialShader from '../shader/circle/CircleWaveMaterialShader.glsl?raw'
import CircleSpreadMaterialShader from '../shader/circle/CircleSpreadMaterialShader.glsl?raw'
import CircleWaveSpreadMaterialShader from '../shader/circle/CircleWaveSpreadMaterialShader.glsl?raw'
import CircleDiffuseMaterialShader from '../shader/circle/CircleDiffuseMaterialShader.glsl?raw'
import CircleGatherMaterialShader from '../shader/circle/CircleGatherMaterialShader.glsl?raw'
import CircleScanMaterialShader from '../shader/circle/CircleScanMaterialShader.glsl?raw'
import CircleTrailMaterialShader from '../shader/circle/CircleTrailMaterialShader.glsl?raw'
import CircleRaderDiffuseMaterialShader from '../shader/circle/CircleRaderDiffuseMaterialShader.glsl?raw'
import CircleScanDiffuseMaterialShader from '../shader/circle/CircleScanDiffuseMaterialShader.glsl?raw'

/**
 * 脉冲圆
 */
Cesium.Material.CirclePulseMaterialType = 'CirclePulse'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CirclePulseMaterialType, {
  fabric: {
    type: Cesium.Material.CirclePulseMaterialType,
    uniforms: {
      color: new Cesium.Color(1., 0.5, 0.,1.),
      speed: 1.0
    },
    source: CirclePulseMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
 * 棒棒糖圆
 */

Cesium.Material.CircleLollipopMaterialType = 'CircleLollipop'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleLollipopMaterialType, {
  fabric: {
    type: Cesium.Material.CircleLollipopMaterialType,
    uniforms: {
      color: Cesium.Color.PURPLE,
      speed: 1.0
    },
    source: CircleLollipopMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
* 峰峦圆
*/

Cesium.Material.CirclePeakMaterialType = 'CirclePeak'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CirclePeakMaterialType, {
  fabric: {
    type: Cesium.Material.CirclePeakMaterialType,
    uniforms: {
      color: Cesium.Color.PURPLE,
      speed: 1.0
    },
    source: CirclePeakMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 波纹圆
 */

Cesium.Material.CircleWaveMaterialType = 'CircleWaveMaterial'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleWaveMaterialType, {
  fabric: {
    type: Cesium.Material.CircleWaveMaterialType,
    uniforms: {
      color: Cesium.Color.AQUA,
      speed: 1.0
    },
    source: CircleWaveMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 仿 cesiumlab 扩散圆
 */

Cesium.Material.CircleSpreadMaterialType = 'CircleSpread'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleSpreadMaterialType, {
  fabric: {
    type: Cesium.Material.CircleSpreadMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0
    },
    source: CircleSpreadMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
* 单色环状多条扩散圆
*/

Cesium.Material.CircleWaveSpreadMaterialType = 'CircleWaveSpread'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleWaveSpreadMaterialType, {
  fabric: {
    type: Cesium.Material.CircleWaveSpreadMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0,
      count: 1,
      gradient: 0.1
    },
    source: CircleWaveSpreadMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
* 从中心扩散圆
*/

Cesium.Material.CircleDiffuseMaterialType = 'CircleDiffuse'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleDiffuseMaterialType, {
  fabric: {
    type: Cesium.Material.CircleDiffuseMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0,

    },
    source: CircleDiffuseMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
 * 收缩圆
 */

Cesium.Material.CircleGatherMaterialType = 'CircleGather'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleGatherMaterialType, {
  fabric: {
    type: Cesium.Material.CircleGatherMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0
    },
    source: CircleGatherMaterialShader
  },
  translucent: function (material) {
    return true
  }
})



/**
 * 雷达扫描圆
 */

Cesium.Material.CircleScanMaterialType = 'CircleScan'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleScanMaterialType, {
  fabric: {
    type: Cesium.Material.CircleScanMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0
    },
    source: CircleScanMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
 * 卫星正射扫描
 */

Cesium.Material.CircleTrailMaterialType = 'CircleTrail'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleTrailMaterialType, {
  fabric: {
    type: Cesium.Material.CircleTrailMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0
    },
    source: CircleTrailMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
 * 雷达扩散波
 */

Cesium.Material.CircleRaderDiffuseMaterialType = 'CircleRaderDiffuse'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleRaderDiffuseMaterialType, {
  fabric: {
    type: Cesium.Material.CircleRaderDiffuseMaterialType,
    uniforms: {
      color: Cesium.Color.YELLOW,
      speed: 1.0,
      repeat: 20.0,
      offset: 0.0,
      thickness: 0.3
    },
    source: CircleRaderDiffuseMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 扫描圆
 */
 
Cesium.Material.CircleScanDiffuseMaterialType = 'CircleScanDiffuse'
Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleScanDiffuseMaterialType, {
  fabric: {
    type: Cesium.Material.CircleScanDiffuseMaterialType,
    uniforms: {
      color: new Cesium.Color(1., 0.5, 0.,1.),
      speed: 1.0
    },
    source: CircleScanDiffuseMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

